package cn.jbooter.restweb.autoconfigure.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

import cn.jbooter.restweb.autoconfigure.realms.UsernamePasswordRealm;

/**
 * shiro的一些通用配置
 * @author hejian
 *
 */
@ConditionalOnProperty(prefix = "spring.shiro", name="enabled", havingValue="true")
public class ShiroConfigure {
	
	/**
	 * username和password的realm
	 * @return
	 */
	@Bean
	public UsernamePasswordRealm usernamePasswordRealm() {
		return new UsernamePasswordRealm();
	}

}
